#ifndef __LinuxNetRateObject__H__
#define __LinuxNetRateObject__H__

#include <QObject>

QT_BEGIN_NAMESPACE

QT_END_NAMESPACE
class LinuxNetRateObject : public QObject
{
    Q_OBJECT
public:
    explicit LinuxNetRateObject(QObject *parent=nullptr);

    enum RateUnit {
        RateBit,
        RateByte,
        RateKb,
        RateMb,
        RateGb,
        RateTb,
        RateUnknow
    };
    Q_ENUM(RateUnit)

    enum Sensitive {
        Default,  // 大小写混合
        Upper,    // 全部大写
        Lower     // 全部小写
    };


public:
    static QString setRateUnitSensitive(RateUnit unit, Sensitive sensitive);
    static double autoRateUnits(long speed, RateUnit &unit);


public:
    // example
    static QString GetStringRateUnit(long speed);
};

#endif  //!__LinuxNetRateObject__H__